from connecttodatabase.connect_to_database import E_SuperManager
from flask import jsonify
from werkzeug.security import generate_password_hash, check_password_hash
from sqlalchemy.exc import SQLAlchemyError

class SCtr_Super:


    @staticmethod
    def login(super_manager_id, password):
        super_manager = E_SuperManager.get_super_manager_by_id(super_ma_id=super_manager_id)
        if not super_manager or  super_manager.get('super_password')!=password:
            return None
        return 1
    
    @staticmethod
    def get_infor(user_id):
        return E_SuperManager.get_super_manager_by_id(user_id)
    
    
    
    